<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="header/h5header::h5header('帅小铺-实体商户社群服务平台',
'/assets/H5/css/ask.css,/assets/H5/css/bus.css',
'/assets/H5/js/flexible.js')">
</head>
<body style="font-size: 16px;">
<div class="container  container-ask" style="padding-top: 0">
	<header class="header03 header-top-0">
		<div class="top">
			<div class="return" onclick="history.back(-1)">
				<span class="icon icon-return"></span>
			</div>
			<div class="location">
				<a href="/city">
					<span class="icon icon-location"></span>
					<span th:text="${cityname}"></span>
				</a>
			</div>
			<div class="logo">
				<a href="/">
					<img src="/assets/H5/images/hlogo.png" alt="">
				</a>
			</div>
			<div class="search-ico">
				<a href="/cq/search?type=ask">
					<span class="icon icon-search"></span>
				</a>
			</div>
			<div class="user">
				<a class="need-login" href="/u/profile">
					<span class="icon icon-user"></span>
				</a>
			</div>
		</div>
	</header>
		<div class="center container-ask-detail " style="">
			<div class="row" style="">
				<!--问-->
				<div class="ask-w">
					<div class="pin-wrapper" style="height: 45px;">
						<div class="ask-wtop" style="width: 357px;">
							<div class="ask-wlogo">
								<img src="/assets/H5/images/icon-question.png" alt="">
							</div>
							<h1>万科四季都会多少钱呀？</h1>
						</div>
					</div>
					<div class="ask-wcont">
						<div class="ask-wcont-field">
							<span>蹇先生</span> <span>70-80万预算</span> <span>刚需</span> <span>关注九龙坡</span>
						</div>
						<div class="ask-wlabel">
							<span>楼盘咨询</span>
						</div>
						<div class="ask-wcon-phone">
							<span>42分钟前</span>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<!--答案-->
				<div class="ask-d">
					<div class="ask-dtop">
						<div class="message">
							<div class="pic">
								<img
									src="http://imgs.julive.com/l?p=eyJpbWdfcGF0aCI6IlwvVXBsb2FkXC9oZWFkZXJcLzIwMjAwNzAxMTYzMTU2MzQ5LmpwZWciLCJpbWdfcGFyYW1fYXJyIjp7IndhdGVybWFyayI6Mn0sIngtb3NzLXByb2Nlc3MiOiJcL3Jlc2l6ZSx3XzEwMCxoXzEwMCxtX2ZpbGxcL2Zvcm1hdCx3ZWJwIn0%3D"
									alt="向阳">
							</div>
							<div class="message-des">
								<div class="name-school">
									<span class="name">向阳</span> <span class="school">毕业于河北地质大学</span>
								</div>
								<div class="number">
									<span> 咨询人数 <i>642人</i>
									</span> <span> 考察楼盘 <i>86次</i>
									</span>

								</div>
							</div>
						</div>
						<div class="mes-tw">
							<a href="javascript:void(0)" class="common-call">免费提问 </a>
						</div>
					</div>
					<div class="ask-logo-wcont">
						<div class="ask-dlogo">
							<img src="/assets/H5/images/icon-answer.png" alt="">
						</div>
						<div class="ask-wcont">
							<p>您好，蹇先生，我是重庆居理新房的向阳，很高兴为您服务，您关注的这个楼盘位于两江新区水土红岩坪站旁，主要在售的产品是：建面85的精装洋房，一梯两户，总高8层，均价110万；建面102~108的精装洋楼，梯户比：2梯4户，总层高：7－11层，总价区间：130万起。</p>
							<p>配套：</p>
							<p>交通:100米直达6号线红岩坪站</p>
							<p>教育:公立西大附中旁</p>
							<p>医疗：重庆第九人民医院（规划），复兴医院</p>
						</div>
					</div>
					<div class="ask-footer">
						<div class="ask-footer-dz">
							<span class="data">2020-07-16 10:03:47 </span>
						</div>
					</div>
				</div>
			</div>
			<div class="row row-ask">
				<div class="go-ask">
					<p>立即提问，得到专业咨询师1对1的解答</p>
					<div class="btn-area">
						<a class="julive_m_four_zero_zero" href="tel:400-680-2528">
							<button class="btn btn-consult">咨询热线</button>
						</a> <a href="javascript:void(0)">
							<button type="button" class="btn btn-find common-call">留言提问</button>
						</a>
					</div>
				</div>
			</div>
		</div>
	</div>

<script type="text/javascript">
layui.use(['layer', 'form', 'formX', 'setter', 'mynotice', 'admin', 'ax', 'util', 'dataGrid', 'element'], function () {
    var $ = layui.jquery;
    var layer = layui.layer;
    var form = layui.form;
    var formX = layui.formX;
    var setter = layui.setter;
    var mynotice = layui.mynotice;
    var admin = layui.admin;
    var $ax = layui.ax;
    var util = layui.util;
    var dataGrid = layui.dataGrid;
    var element = layui.element;
    
    var Buyinghouse = {
    	ins: {},
    	pattern: /^1(3|4|5|7|8)\d{9}$/,
    	dataGridRender:() => { // 渲染数据列表
    		Buyinghouse.ins = dataGrid.render({
    	        elem: '#wdList',  // 容器
    	        templet: '#itemlist',  // 模板
    	        url: '/zp/question/qlist',  // 数据接口
    	        loadMore: {
    	        		limit: 10,
    	        		text: '点击加载更多',
    	        		loadingText: '<div class="loading-waiting" style=""><img src="//static.julive.com/m/images/haderline-loading.png?t=20200715_205041" alt="loading" title="loading" class="loading-img"> 更多精彩内容加载中… </div>',
    	        		noMoreText: '<div class="go-ask go-ask-project"><p>没有更多问答啦，更多疑问可以直接提问哦~</p></div>',
    	        		errorText: '加载失败，请重试',
    	        	},  // 开启分页
    	        done: function(res, curr, count){
    	        	
    	        }
    	    });
    		dataGrid.on('tool(wdList)', function (obj) {
                var modeldata = obj.data;
                if (obj.event === 'xtzx') {
                	admin.open({
            			type: 1,
            			title: false,
            			offset: 'auto',
            			closeBtn: 0,
            			skin: 'yourclass',
            			area: ['500px', '390px'],
            			content: $('#dialogform').html(),
            			success: function(layero, dIndex){
            				$(layero).children('.layui-layer-content').css('overflow', 'visible'); 
            				/*提交问题*/
            			    form.on('submit(questionsubmit)', function(data){
            			    	if(!Buyinghouse.pattern.test(data.field.phone)){
            		        		$("#erroMsg").removeClass('layui-hide');
            		            	return false;
            		        	}
            			    	layer.close(dIndex);
            			    	mynotice.load('提交中，请稍后...');
                			    var ajax = new $ax('/zp/question/add', 'post', function (res) {
                			    	mynotice.destroy();
                			    	admin.open({
                    	    			type: 1,
                    	    			title: false,
                    	    			offset: 'auto',
                    	    			closeBtn: 0,
                    	    			skin: 'yourclass',
                    	    			area: '500px',
                    	    			content: $('#dialogSuccessform').html(),
                    	    			success: function(layero, dIndex){
                    	    				$(layero).children('.layui-layer-content').css('overflow', 'visible'); 
                    	    			}
                    				})
                			    }, function (res) {
                			    	mynotice.destroy();
                			    	mynotice.error(res.msg);
                			    });
                			    data.field.consultant = modeldata.consultant;
                			    ajax.setData(JSON.stringify(data.field));
                			    ajax.start();
            				    return false;
            			    });
            			}
            		})
                }
            });
    	}
    	
    }
    
    //监听提交
    form.on('submit(searchformBtn)', function(data){
    	Buyinghouse.ins.reload({where: data.field}); 
    	return false;
    });
    
    util.event('lay-event', {
    	seac: function(){
    		if(!$(this).hasClass('on')){
    			var id = $(this).data('id');
    			$('.on').removeClass('on');
    			$(this).addClass('on');
    			Buyinghouse.ins.reload({where: {questionType: id} }); 
    		}
    		
    	}
    })
    
});

</script>
	
</body>
</html>